using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ThunderStrikeControl : MonoBehaviour
{
    protected PlayerStats playerStats;
    private void Start()
    {
        playerStats = PlayerManger.instance.player.GetComponent<PlayerStats>();
    }
    protected virtual void OnTriggerEnter2D(Collider2D collision)
    {
        if(collision.GetComponent<Enemy>()!=null)
        {
            EnemyStats enemyTarget=collision.GetComponent<EnemyStats>();
            playerStats.DoMagicalDamage(enemyTarget);
        }
    }
}
